package org.hp.service.admin;

import org.hp.bean.Admin;
import org.hp.dao.admin.AdminDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdminServiceImpl implements AdminService {
    @Resource
    AdminDao adminDao;

    @Override
    public List<Admin> adminquery(Admin admin) {
        return adminDao.adminquery(admin);
    }

    @Override
    public List<Admin> adminquery2() {
        return adminDao.adminquery2();
    }

    @Override
    public List<Admin> adminqueryone(Integer aid) {
        return adminDao.adminqueryone(aid);
    }

    @Override
    public Boolean adminupdate(Admin admin) {
        if(adminDao.adminupdate(admin)>0){
            return true;
        }else
            return false;
    }

    @Override
    public Boolean adminupdate2(Admin admin) {
        if(adminDao.adminupdate2(admin)>0){
            return true;
        }else
            return false;
    }

    @Override
    public Boolean adminupdate3(Admin admin) {
        if(adminDao.adminupdate3(admin)>0){
            return true;
        }else
            return false;
    }

    @Override
    public Boolean admininsert(Admin admin) {
        if(adminDao.admininsert(admin)>0){
            return true;
        }else
            return false;
    }
}
